﻿using Coding4FunCamera;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Configuration;
using System.Collections.Specialized;

namespace CameraTests
{
    
    
    /// <summary>
    ///This is a test class for CameraFileUtilitiesTest and is intended
    ///to contain all CameraFileUtilitiesTest Unit Tests
    ///</summary>
    [TestClass()]
    public class CameraFileUtilitiesTest
    {


        private TestContext testContextInstance;
        private static NameValueCollection _configurationValues;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        [ClassInitialize()]
        public static void MyClassInitialize(TestContext testContext)
        {
             _configurationValues = ConfigurationManager.AppSettings;
        }
        #endregion


        /// <summary>
        ///A test for incrementFileNameNumber
        ///</summary>
        [TestMethod()]
        public void incrementFileNameNumberTest()
        {
            string file = _configurationValues["inputimagefile"]; ; // TODO: Initialize to an appropriate value
            string expected = _configurationValues["outputIncrementedImageFile"]; // TODO: Initialize to an appropriate value
            string actual;
            actual = CameraFileUtilities.incrementFileNameNumber(file);
            Assert.AreEqual(expected, actual);
          
        }

       
    }
}
